package com.jblog.core.model.blog;

import java.util.List;

import com.jblog.core.model.BaseModel;
import com.jblog.core.model.account.Account;
import com.jblog.core.model.common.Privacy;
import com.jblog.core.model.common.Source;
import com.jblog.core.model.common.Status;

/**
 * Post.java
 */
public class Post extends BaseModel {

    private static final long serialVersionUID = 1L;

    private String alias;
    private Category category;
    private String title;
    private Boolean isTop;
    private String author;
    private String descript;
    private String content;
    private String imgUrl;
    private List<Tag> tags;
    private Long scan;
    private Long sortId;
    private Source source;
    private String originalUrl;
    private Status status;
    private Boolean isAllowComment;
    private Privacy privacy;
    private Account postBy;
    private Long comments;

    public Post() {
        super();
    }

    public Post(Long id) {
        super(id);
    }

    public Post(String alias) {
        super();
        this.alias = alias;
    }

    public Post(Long id, String alias) {
        super(id);
        this.alias = alias;
    }

    public Post(Long id, Status status) {
        super(id);
        this.status = status;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Boolean getIsTop() {
        return isTop;
    }

    public void setIsTop(Boolean isTop) {
        this.isTop = isTop;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    public String getContent() {
        return content;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public List<Tag> getTags() {
        return tags;
    }

    public void setTags(List<Tag> tags) {
        this.tags = tags;
    }

    public Long getScan() {
        return scan;
    }

    public void setScan(Long scan) {
        this.scan = scan;
    }

    public Long getSortId() {
        return sortId;
    }

    public void setSortId(Long sortId) {
        this.sortId = sortId;
    }

    public Source getSource() {
        return source;
    }

    public void setSource(Source source) {
        this.source = source;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Boolean getIsAllowComment() {
        return isAllowComment;
    }

    public void setIsAllowComment(Boolean isAllowComment) {
        this.isAllowComment = isAllowComment;
    }

    public Privacy getPrivacy() {
        return privacy;
    }

    public void setPrivacy(Privacy privacy) {
        this.privacy = privacy;
    }

    public Long getComments() {
        return comments;
    }

    public void setComments(Long comments) {
        this.comments = comments;
    }

    public String getOriginalUrl() {
        return originalUrl;
    }

    public void setOriginalUrl(String originalUrl) {
        this.originalUrl = originalUrl;
    }

    public Account getPostBy() {
        return postBy;
    }

    public void setPostBy(Account postBy) {
        this.postBy = postBy;
    }

    @Override
    public String toString() {
        return "Post [alias=" + alias + ", catalog=" + category 
                + ", id=" + getId() + "]";
    }

}